﻿@namespace MudBlazor.UnitTests.TestComponents
<MudPopoverProvider></MudPopoverProvider>

<div>
    <MudSelect T="string" Variant="Variant.Text"
               IsPreRendered="true"
               @bind-Value="fruit"
               Direction="Direction.Bottom" Dense="true" OffsetY="true"
               SelectedValuesChanged="@(() => FruitChanged(null))">

        <MudSelectItem Value="@("Apple")">Apple</MudSelectItem>
        <MudSelectItem Value="@("Orange")">Orange</MudSelectItem>
    </MudSelect>
</div>

@code{
    string fruit = "Apple";
    public int ChangeCount { get; private set; }

    void FruitChanged(IEnumerable<string> fruits)
    {
        ChangeCount++;
    }
}